<template>
    <div>
        <span>hasRequest: {{hasRequest}}</span>
        <button @click="setHasRequest">设置HasRequest</button>
    </div>
</template>
<script>
export default {
    name: 'Index',
    computed: {
        hasRequest: function () {
            return this.$store.app.state.hasRequest
        }
    },
    methods: {
        setHasRequest () {
            this.$store.dispatch('app/setHasRequest', !this.$store.app.state.hasRequest)
        }
    }
}
</script>